package com.cxx.purchasecharge.dal;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.cxx.purchasecharge.core.model.GoodsStorageCourse;
import com.cxx.purchasecharge.core.model.GoodsStorageCourseSearchForm;
import com.cxx.purchasecharge.core.model.persistence.Goods;
import com.cxx.purchasecharge.core.model.persistence.GoodsType;
import com.cxx.purchasecharge.dal.common.MyGenericDao;

public interface GoodsDao extends MyGenericDao <Goods, Long>
{

    public Goods findByName (String name);

    public Goods findByBarCode (String barCode);

    public List <Goods> findByType (GoodsType type);
    
    List <Goods> findByFuzzyName (String keyWord);

    List <Goods> findGoodsType ();

    Page <Goods> findByFuzzy (Pageable pageable, String searchKey);

    List <GoodsStorageCourse> findGoodsStorageCourse (long goodsId);

    Page <GoodsStorageCourse> findGoodsStorageCourse (Pageable pageable, GoodsStorageCourseSearchForm searchForm);

}
